<?php include "counter.php" ?>
<html>
<?php pagehead("Recent registrants") ?>
<body>
<?php pagetop() ?>
<h1><img src="/gifs/Logo-small.png" align=bottom border=0>
The most recent registrants with the Linux Counter</h1>

The time at the counter machine is now <?php echo gmstrftime ("%b %d %Y %H:%M:%S",time())."\n"; ?> GMT.
<h2>People</h2>
<table border>
<?php
$query = mysql_query('SELECT f_key, name, country, f_clean, city, f_ctime FROM persons ORDER BY f_key desc LIMIT 15');
while ($arr = mysql_fetch_array($query)) {
    echo '   <tr>'."\n";
    echo '       <td>'. $arr['f_ctime'] .'</td>'."\n";
    echo '       <td>';
    if (!preg_match("/may.publish:Yes/i", $arr['f_clean'])) {
       echo 'anonymous';
   } else { 
       if ($arr['name'] == "") { $arr['name'] = 'nameless'; }
       echo '<a href="/cgi-bin/runscript/display-person.cgi?user='. $arr['f_key'] .'">'. $arr['name'] .'</a>';
   }
   echo '       </td>'."\n";
   echo '       <td>'. $arr['city'] .'</td>'."\n";
   echo '       <td>'. $arr['country'] .'</td>'."\n";
   echo '   </tr>'."\n";
}
?>
</table>
<h2>Machines</h2>
<table border>
<?php
$query = mysql_query('SELECT f_key, distribution, cpu, country, f_ctime FROM machines ORDER BY f_key desc LIMIT 15');
while ($arr = mysql_fetch_array($query)) {
    echo '   <tr>'."\n";
    echo '       <td>'. $arr['f_ctime'] .'</td>'."\n";
    echo '       <td>'. $arr['distribution'] .'</td>'."\n";
    echo '       <td>'. $arr['cpu'] .'</td>'."\n";
    echo '       <td>'. $arr['country'] .'</td>'."\n";
    echo '   <tr>'."\n";
}
?>
</table>
<?php pagebottom() ?>
</body>
</html>
